package qq2564874169.tuaotuao.fx.app.so;

import org.springframework.context.ApplicationContext;

public class DefaultServiceContext extends AbstractServiceContext {
    private ApplicationContext beanContext;

    public DefaultServiceContext(ApplicationContext beanContext) {
        this.beanContext = beanContext;
    }

    @Override
    public void use(ServiceObject serviceObject, Object state) {
        beanContext.getAutowireCapableBeanFactory().autowireBean(serviceObject);
        executeSo(serviceObject, state);
    }
}
